const express = require('express');
let app = express();
let json = require('./index.json')

app.set('view engine','jade');

app.get('/', function (req, res) {
    console.log(json)
   res.render('index',{title:'key',message:'hello world'})
});
app.use('/static', express.static('public'))
app.use(function (req, res, next) {
    res.status(404).send('Sorry cant find that!');
});
const server = app.listen(3000, function () {
    const host = server.address().address;
    const port = server.address().port;
    console.log('express app run in ', host, ":", port)
})